package com.gdrcu.efp.cus.common;

/**
 * 将证件类型转换为省信贷的证件类型
 * @author zmr
 * 2018-06-20
 */
public enum ChangeCertTypeContant {

	CODE_10100("10100","10"),//居民身份证
	CODE_10200("10200","30"),//临时身份证
	CODE_10300("10300","31"),//户口本
	CODE_10400("10400","11"),//护照
	CODE_10501("10501","12"),//士兵证
	CODE_10900("10900","34"),//外国人居留证
	CODE_10602("10600","32"),//武警身份证
	CODE_10701("10701","13"),//港澳居民来往内地通行证
	CODE_10702("10702","14"),//台湾居民来往大陆通行证
	CODE_19999("19999","36"),//个人其它证件
	;
	private String key;
	private String value;
	public String getKey() {
		return key;
	}
	public String getValue() {
		return value;
	}
	private ChangeCertTypeContant(String key, String value) {
		this.key = key;
		this.value = value;
	}
	 public static String parse(String key) {
	        for(ChangeCertTypeContant certType : ChangeCertTypeContant.values()) {
	            if(certType.value.equals(key)) {
	                return certType.getKey();
	            }
	        }
	        return "19999";
	 }
	 public static String parseKey(String key) {
	        for(ChangeCertTypeContant certType : ChangeCertTypeContant.values()) {
	            if(certType.key.equals(key)) {
	                return certType.getValue();
	            }
	        }
	        return "36";
	 }
}
